<?php 
	$kh_id=$_POST['kh_id'];
	$content=$_POST['noidung'];
	$user=$_SESSION['name'];
	$date=time();
	$soanh=$_POST['hdnsoanh'];
	$hinhanhsp = "";
	for($i=1;$i<=$soanh;$i++){
		if($i<$soanh)$hinhanhsp .= $_POST["sanpham_hinhanh".$i]."~";
		else $hinhanhsp .= $_POST["sanpham_hinhanh".$i];
	}
	if($content!="")
	{		
		mysql_query("
					insert
					into care_marketing
						(user_care,content_care,file_care,kh_care,time_care)
					value
						('$user','$content','$hinhanhsp','$kh_id','$date')
				");
				
		$cauthongbao="Thành công";
		$link=$url_main_site."system/index.php?tn=marketing&ma=marketing_detail&id=$kh_id";
		thongbao($cauthongbao,$link);
	}
	else
	{
		$cauthongbao="Bạn chưa nhập nội dung";
		$link=$url_main_site."system/index.php?tn=marketing&ma=marketing_detail&id=$kh_id";
		thongbao($cauthongbao,$link);
	}
?>